package com.jython.demo.controller;

import com.jython.demo.domain.WordCount;
import com.jython.demo.service.WordCountService;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@EnableAutoConfiguration
public class WordCountController {
    @Resource
    private WordCountService wordCountService;
    @RequestMapping(value = "/test")
    public String getList(){
        return "ok";
    }
    @RequestMapping(value = "/show")
    public List<com.jython.demo.model.WordCount> show(){
        return wordCountService.show();
    }
}
